1. Field of the Invention
The present invention relates to a printer, and more specifically, to a printer, such as a laser printer, capable of bit shifting.
2. Description of the Prior Art
In writing font data or image data into the bit map memory of laser printers, a slight writing adjustment is made by a shift per dot. Such an adjustment is required, for example, in a case where a user intends to change character spacing or to draw a character or a line at a position intended by the user.
Conventionally, the per-bit adjustment for making such a writing adjustment has been made by a bit shift such as a right shift, a left shift or a circular shift, by use of a CPU (central processing unit). The bit map memory is a memory where a virtual page or a part thereof is formed in a memory area where image information is stored so that one bit corresponds to one dot.
The above-described bit shift operation for performing the bit shift is performed by shifting image data read into a register to the left or right in response to a bit shift instruction by the CPU, and by storing an overflowing bit in a memory.
FIG. 4A shows an image "A" which is represented by 8 bits with respect to one direction which image is data stored in a font ROM (read only memory). An operation for transferring this image to the bit map memory will be considered. Generally, data can be stored in the CPU only in 8 bit, 16 bit or 32 bit strings. Therefore, in a case where the image "A" is to be shifted to the right by 3 bits beyond the 8-bit limit, first, the left 5 bits of the 8 bits of the image "A" are shifted to the right by 3 bits. Then, the remaining 3 bits are written onto the first portion of the succeeding 8 bit string.
As described above, in laser printers, the per-bit adjustment has conventionally been made according to the image position in response to a bit shift operation instruction of the CPU when image data formed by the CPU is written onto the bit map memory.
However, the above-described per-bit adjustment, which is made in response to the bit operation instruction of the CPU, requires a large amount of time. As a result, the processing capability (performance) of the printer deteriorates. The reason why the above adjustment takes time is that it takes time for the CPU to perform the bit shift operation, and that all or most of the procedures involved therewith are executed by software. For example, in the bit shift of FIG. 4A, two operations are required where 5 bits and 3 bits are separately read out from a register, in which an 8-bit image data is written, and where the read-out bits are shifted and written in the bit map memory. Because of this, the bit operation takes a large amount of time. Moreover, in case where a logical operation (e.g. OR operation) with an image data previously stored in the memory is performed, it takes a large amount of time to read-in the previously-stored image data in writing a new image data.